<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Google Translate</title>

  <link href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400&display=swap" rel="stylesheet" />
  <link rel="stylesheet"
    href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />

  <link rel="stylesheet" href="styles.css">
  <script type="module" src="scripts.js"></script>
</head>

<body>
  <div class="container">

    <!-- Header -->
    <header class="header">
      <div class="header-content">
        <div class="logo">
          <span class="google-g">G</span>
          <span class="google-o1">o</span>
          <span class="google-o2">o</span>
          <span class="google-g">g</span>
          <span class="google-l">l</span>
          <span class="google-e">e</span>
          <span class="traductor">Traductor</span>
        </div>
      </div>
    </header>

    <!-- API Warning -->
    <div id="apiWarning" class="api-warning" style="display: none;">
      ⚠️ APIs nativas de traducción no disponibles. Funcionalidad limitada.
    </div>

    <!-- Selector -->
    <section class="language-selection">
      <div class="source-language">
        <select id="sourceLanguage">
          <option value="auto">Detectar idioma</option>
          <option value="en">Inglés</option>
          <option value="es">Español</option>
          <option value="fr">Francés</option>
          <option value="de">Alemán</option>
          <option value="it">Italiano</option>
          <option value="pt">Portugués</option>
          <option value="ru">Ruso</option>
          <option value="ja">Japonés</option>
          <option value="zh">Chino</option>
        </select>
      </div>

      <button class="swap-languages icon-button" id="swapLanguages">
        <span class="material-symbols-outlined">
          swap_horiz
        </span>
      </button>

      <div class="target-language">
        <select id="targetLanguage">
          <option value="en">Inglés</option>
          <option value="es">Español</option>
          <option value="fr">Francés</option>
          <option value="de">Alemán</option>
          <option value="it">Italiano</option>
          <option value="pt">Portugués</option>
          <option value="ru">Ruso</option>
          <option value="ja">Japonés</option>
          <option value="zh">Chino</option>
        </select>
      </div>
    </section>

    <!-- Textarea -->
    <main class="translation-area">
      <section class="input-section">
        <div class="textarea-container">
          <textarea id="inputText" placeholder="Introduce el texto" maxlength="5000"></textarea>
          <!-- button para borrar el contenido -->
        </div>
        <footer class="input-controls">
          <button class="icon-button mic-button" id="micButton">
            <span class="material-symbols-outlined">
              mic
            </span>
          </button>
        </footer>
      </section>

      <section class="output-section">
        <div class="textarea-container">
          <output id="outputText"></output>

          <footer class="output-controls">
            <button class="icon-button copy-button" id="copyButton">
              <span class="material-symbols-outlined">
                content_copy
              </span>
            </button>

            <button class="icon-button speaker-button" id="speakerButton">
              <span class="material-symbols-outlined">
                volume_up
              </span>
            </button>
          </footer>
        </div>

      </section>
    </main>
  </div>
</body>

</html>